<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>仿写JSON</title>
</head>
<body>
    <div style="margin-left: 130px;font-size: 18px;">
        <h1>F12查看效果</h1>
        <h2>Json格式转对象</h2>
        <div id="damo1"></div>
        <h2>对象转json格式</h2>
        <div id="damo2"></div>
        <br>
        <br>
        <br>
    </div>
</body>
</html>
<script src="./仿写JSON.js"></script>
<script>
    var result1 = Json('{"a":1,"b":"qq"}')
    // console.log(result1);
    document.querySelector('#damo1').innerText = `Json('{"a":1,"b":"qq"}')//{a: 1, b: 'qq'}` 
    var result2= Stingify({c:2,d:'cs'})
    // console.log(result2);
    document.querySelector('#damo2').innerText = `Stingify({c:2,d:'cs'})//'{"c":2,"d":"cs"}'` 
</script>